package com.cnap.multiclouldmgmt.service;

import com.cnap.multiclouldmgmt.model.prometheusModels.PrometheusAlertModel;

import java.util.List;
/**
 * @author dyq
 * 基础服务
 */
public interface PrometheusService {

    /**
     *
     * @param k8sClusterIp
     * @param nodeIp
     * @return
     */
    double getNodeDiskThroughputByMbPerS(String k8sClusterIp,String nodeIp,String arch);

    /**
     *
     * @param k8sClusterIp
     * @param nodeIp
     * @return
     */
    long getNodeDiskIOPS(String k8sClusterIp,String nodeIp,String arch);

    /**
     *
     * @param k8sClusterIp
     * @param nodeIp
     * @return
     */
    double getNodeNetBandwidthBybps(String k8sClusterIp,String nodeIp,String arch);

    /**
     *
     * @param k8sClusterIp
     * @param nodeIp
     * @return
     */
    long getNodeNetIOPS(String k8sClusterIp,String nodeIp,String arch);

    /**
     * 获取硬盘空闲大小，单位B
     * @param k8sClusterIp
     * @param nodeIp
     * @return
     */
    long getNodeDiskFreeUnitB(String k8sClusterIp,String nodeIp,String arch);

    /**
     *
     * @param pSql
     * @param userName
     * @param beginDate
     * @param endDate
     * @return
     * @throws Exception
     */
    List<PrometheusAlertModel> getPrometheusRangeData(String pSql, String userName, String beginDate, String endDate) throws Exception;

    /**
     * 获得所有盘的大小
     * @param k8sClusterIp
     * @param nodeIp
     * @return
     */
    long getNodeDiskTotalToB(String k8sClusterIp, String nodeIp,String arch);

    int getGpuTemp(String k8sClusterIp);

    double getGpuUsage(String k8sClusterIp);

    double getGpuPower(String k8sClusterIp);

    double getGpuMemUse(String k8sClusterIp);

    double getGpuMemFree(String k8sClusterIp);
}
